import 'package:qgchat/page/live/videoPage/live/model/videoText.dart';

/// 视频文字 抽象基类
abstract class VideoTextRepository {
  void addText(VideoTextModel text);

  void delText(VideoTextModel text);

  List<VideoTextModel> get texts;

  void updText(VideoTextModel text);
}

/// 通用数据处理办法
class BaseVideoTextRepository implements VideoTextRepository {
  List<VideoTextModel> _list = []; // 对话列表

  /// 增
  addText(VideoTextModel text) {
    _list.insert(0, text);
  }

  /// 删
  delText(VideoTextModel text) {}

  /// 查
  List<VideoTextModel> get texts => _list.map((i) => i).toList();

  /// 改
  updText(VideoTextModel text) {}
}